package com.universe.test;

import javax.swing.JFrame;

public class Panel extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private UniverseAdapter uad;
	
	public Panel(){
		super("Test app");
		
		uad = new UniverseAdapter(1000,1000);
		add(uad);
		
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		this.setSize(1000,1000);
		this.setVisible(true);
		refresh();
	}
	
	public void refresh(){
		while(true){
			try {
				Thread.sleep(10);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			uad.iterate();
			uad.repaint();
		}
	}
	
}
